package my.sc.openfeign;

import entity.Product;
import my.sc.factory.ProductFeignFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ：Q大侠
 * @date ：Created in 2022/11/20 18:11
 * @description：商品OpenFeign
 * @modified By：
 * @version:
 */
@FeignClient(value = "shop-product",fallbackFactory = ProductFeignFactory.class)
public interface ProductFeign {
    @GetMapping("/product/getById/{pid}")
    Product getById(@PathVariable Long pid);
}
